LOCAL_PATH := $(call my-dir)  

ROM_ROOT := /work/android_rom/fanlian/RK3188_RK3066_R-BOX_ANDROID4.4.2-SDK_V1.0.0_140318
SYS_DIR := $(ROM_ROOT)/out/target/product/rk3188/system/lib

gcc_var = $(get_build_var TARGET_GCC_VERSION)
$(warning "the value of gcc_var is $(gcc_var)")  

include $(CLEAR_VARS)  
LOCAL_MODULE := dmsglog
LOCAL_SRC_FILES := dmsglog.c
include $(BUILD_EXECUTABLE)  


include $(CLEAR_VARS)  
LOCAL_MODULE := primitives
LOCAL_SRC_FILES :=  primitives/prim_add.c \
					primitives/prim_add_opt.c \
					primitives/prim_alphaComp.c \
					primitives/prim_alphaComp_opt.c \
					primitives/prim_andor.c \
					primitives/prim_andor_opt.c \
					primitives/prim_colors.c \
					primitives/prim_colors_opt.c \
					primitives/prim_copy.c \
					primitives/primitives.c \
					primitives/prim_set.c \
					primitives/prim_set_opt.c \
					primitives/prim_shift.c \
					primitives/prim_shift_opt.c \
					primitives/prim_sign.c \
					primitives/prim_sign_opt.c \
					primitives/prim_YCoCg.c \
					primitives/prim_YCoCg_opt.c \
					primitives/prim_YUV.c \
					primitives/prim_YUV_opt.c \
					primitives/utils/cpu-features.c \
					primitives/utils/sysinfo.c \
					primitives/utils/alignment.c

LOCAL_CFLAGS += -DWITH_NEON -DHAVE_NEON -mfloat-abi=softfp -mfpu=neon -march=armv7-a -DANDROID
LOCAL_LDFLAGS += -mfloat-abi=softfp -mfpu=neon
include $(BUILD_SHARED_LIBRARY) 

include $(CLEAR_VARS)  
LOCAL_MODULE := vpu 
LOCAL_SRC_FILES := vpu.c  

LOCAL_C_INCLUDES += \
					 ${ROM_ROOT}/hardware/rk29/libon2/

LOCAL_LDLIBS += -L$(SYS_DIR) -lc -lcutils -lutils -lui -lbinder -lgui -ljnigraphics -llog -ldl -lstdc++ -lz -landroid -lEGL -lGLESv2 -lGLESv1_CM $(SYS_DIR)/libc.so -lvpu -lrk_on2

include $(BUILD_EXECUTABLE) 

include $(CLEAR_VARS)  
LOCAL_MODULE := fbl 
LOCAL_SRC_FILES := fbl.c  
include $(BUILD_EXECUTABLE)  

include $(CLEAR_VARS)  
LOCAL_MODULE := eat 
LOCAL_SRC_FILES := eat.c  
include $(BUILD_EXECUTABLE)  

include $(CLEAR_VARS)  
LOCAL_MODULE := thp 
LOCAL_SRC_FILES := thpool.c  thpool_main.c
include $(BUILD_EXECUTABLE) 

include $(CLEAR_VARS)  
LOCAL_MODULE := mp 
LOCAL_SRC_FILES := mp.c
LOCAL_CFLAGS += -fopenmp
LOCAL_LDFLAGS += -O3 -fopenmp -llog -landroid
include $(BUILD_EXECUTABLE) 

include $(CLEAR_VARS)  
LOCAL_MODULE := rw 
LOCAL_SRC_FILES := rw.c
LOCAL_LDFLAGS += -O3 -llog -landroid
include $(BUILD_EXECUTABLE)  

include $(CLEAR_VARS)  
LOCAL_MODULE := textures 

LOCAL_C_INCLUDES += \
                    ${ROM_ROOT}/frameworks/native/include \
                    ${ROM_ROOT}/hardware/libhardware/include \
                    ${ROM_ROOT}/system/core/include \
        			${ROM_ROOT}/frameworks/native/opengl/include

LOCAL_CFLAGS := -DGL_GLEXT_PROTOTYPES

LOCAL_LDLIBS += -L$(SYS_DIR) -lc -lcutils -lutils -lui -lbinder -lgui -ljnigraphics -llog -ldl -lstdc++ -lz -landroid -lEGL -lGLESv2 -lGLESv1_CM $(SYS_DIR)/libc.so

LOCAL_SRC_FILES := textures.cpp
include $(BUILD_EXECUTABLE)  

# include $(CLEAR_VARS)  
# LOCAL_MODULE := texture_win 

# LOCAL_C_INCLUDES += \
#                     ${ROM_ROOT}/frameworks/native/include \
#                     ${ROM_ROOT}/hardware/libhardware/include \
#                     ${ROM_ROOT}/system/core/include \
#         			${ROM_ROOT}/frameworks/native/opengl/include
# LOCAL_LDLIBS += -L$(SYS_DIR) -lc -lcutils -lutils -lui -lbinder -lgui -ljnigraphics -llog -ldl -lstdc++ -lz \
#                    -malign-double -malign-loops -landroid -lEGL -lGLESv2 -lGLESv1_CM $(SYS_DIR)/libc.so
# LOCAL_SRC_FILES := texture_win.cpp  
# include $(BUILD_EXECUTABLE)  

# include $(CLEAR_VARS)  
# LOCAL_MODULE := surface 

# LOCAL_C_INCLUDES += \
#                     ${ROM_ROOT}/frameworks/native/include \
#                     ${ROM_ROOT}/hardware/libhardware/include \
#                     ${ROM_ROOT}/system/core/include \
#         			${ROM_ROOT}/frameworks/native/opengl/include
# LOCAL_LDLIBS += -L$(SYS_DIR) -lc -lcutils -lutils -lui -lbinder -lgui -ljnigraphics -llog -ldl -lstdc++ -lz \
#                    -malign-double -malign-loops -landroid -lEGL -lGLESv2 -lGLESv1_CM $(SYS_DIR)/libc.so
# LOCAL_SRC_FILES := surface.cpp
# include $(BUILD_EXECUTABLE) 


# include $(CLEAR_VARS)  
# LOCAL_MODULE := surface_fixbuf

# LOCAL_C_INCLUDES += \
#                     ${ROM_ROOT}/frameworks/native/include \
#                     ${ROM_ROOT}/hardware/libhardware/include \
#                     ${ROM_ROOT}/system/core/include \
#         			${ROM_ROOT}/frameworks/native/opengl/include
# LOCAL_LDLIBS += -L$(SYS_DIR) -lc -lcutils -lutils -lui -lbinder -lgui -ljnigraphics -llog -ldl -lstdc++ -lz \
#                    -malign-double -malign-loops -landroid -lEGL -lGLESv2 -lGLESv1_CM $(SYS_DIR)/libc.so
# LOCAL_SRC_FILES := surface_fixbuf.cpp
# include $(BUILD_EXECUTABLE) 


# include $(CLEAR_VARS)  
# LOCAL_MODULE := surface_thread

# LOCAL_C_INCLUDES += \
#                     ${ROM_ROOT}/frameworks/native/include \
#                     ${ROM_ROOT}/hardware/libhardware/include \
#                     ${ROM_ROOT}/system/core/include \
#         			${ROM_ROOT}/frameworks/native/opengl/include
# LOCAL_LDLIBS += -L$(SYS_DIR) -lc -lcutils -lutils -lui -lbinder -lgui -ljnigraphics -llog -ldl -lstdc++ -lz \
#                    -malign-double -malign-loops -landroid -lEGL -lGLESv2 -lGLESv1_CM $(SYS_DIR)/libc.so
# LOCAL_SRC_FILES := surface_thread.cpp
# include $(BUILD_EXECUTABLE)  

# include $(CLEAR_VARS)  
# LOCAL_MODULE := surface_thread_fix

# LOCAL_C_INCLUDES += \
#                     ${ROM_ROOT}/frameworks/native/include \
#                     ${ROM_ROOT}/hardware/libhardware/include \
#                     ${ROM_ROOT}/system/core/include \
#         			${ROM_ROOT}/frameworks/native/opengl/include
# LOCAL_LDLIBS += -L$(SYS_DIR) -lc -lcutils -lutils -lui -lbinder -lgui -ljnigraphics -llog -ldl -lstdc++ -lz \
#                    -malign-double -malign-loops -landroid -lEGL -lGLESv2 -lGLESv1_CM $(SYS_DIR)/libc.so
# LOCAL_SRC_FILES := surface_thread_fix.cpp
# include $(BUILD_EXECUTABLE)  

include $(CLEAR_VARS)  
LOCAL_MODULE := update

LOCAL_C_INCLUDES += \
                    ${ROM_ROOT}/frameworks/native/include \
                    ${ROM_ROOT}/hardware/libhardware/include \
                    ${ROM_ROOT}/system/core/include \
        			${ROM_ROOT}/frameworks/native/opengl/include
LOCAL_LDLIBS += -L$(SYS_DIR) -lc -lcutils -lutils -lui -lbinder -lgui -ljnigraphics -llog -ldl \
 -lstdc++ -lz -landroid -lEGL -lGLESv2 -lGLESv1_CM $(SYS_DIR)/libc.so
LOCAL_SRC_FILES :=  update.cpp
include $(BUILD_EXECUTABLE)  



# include $(CLEAR_VARS)  
# LOCAL_MODULE := dtt

# LOCAL_C_INCLUDES += \
#                     ${ROM_ROOT}/frameworks/native/include \
#                     ${ROM_ROOT}/hardware/libhardware/include \
#                     ${ROM_ROOT}/system/core/include \
#         ${ROM_ROOT}//frameworks/native/opengl/include
# LOCAL_LDLIBS += -L$(SYS_DIR) -lc -lcutils -lutils -lui -lbinder -lgui \
# -ljnigraphics -llog -ldl -lstdc++ -lz  -malign-double -malign-loops -landroid \
# -lEGL -lGLESv2 -lGLESv1_CM $(SYS_DIR)/libc.so 

# LOCAL_SRC_FILES :=  galileo_direct_texture_test.cpp utils/fps.c utils/task.c
# include $(BUILD_EXECUTABLE)  

include $(CLEAR_VARS)  
LOCAL_MODULE := gralloc
LOCAL_C_INCLUDES += \
                    ${ROM_ROOT}/frameworks/native/include \
                    ${ROM_ROOT}/hardware/libhardware/include \
                    ${ROM_ROOT}/system/core/include \
        			${ROM_ROOT}/frameworks/native/opengl/include

#OCAL_CFLAGS := -malign-double -malign-loops 
LOCAL_LDLIBS += -L$(SYS_DIR) -lc -lui  -lgui \
	-ljnigraphics -llog -ldl -lstdc++ -lz -landroid \
	-lEGL -lGLESv2 -lGLESv1_CM  -lcutils -lutils -lbinder -v

LOCAL_SRC_FILES := gralloc.cpp
include $(BUILD_EXECUTABLE) 

include $(CLEAR_VARS)  
LOCAL_MODULE := graphics_buffer

LOCAL_C_INCLUDES += \
                    ${ROM_ROOT}/frameworks/native/include \
                    ${ROM_ROOT}/hardware/libhardware/include \
                    ${ROM_ROOT}/system/core/include \
        			${ROM_ROOT}//frameworks/native/opengl/include
LOCAL_LDLIBS += -L$(SYS_DIR) -lc -lcutils -lutils -lui -lbinder -lgui \
-ljnigraphics -llog -ldl -lstdc++ -lz -landroid \
-lEGL -lGLESv2 -lGLESv1_CM $(SYS_DIR)/libc.so

LOCAL_SRC_FILES := graphics_buffer.cpp
include $(BUILD_EXECUTABLE) 


# include $(CLEAR_VARS)  
# LOCAL_MODULE := hwc

# LOCAL_C_INCLUDES += \
#                     ${ROM_ROOT}/frameworks/native/include \
#                     ${ROM_ROOT}/hardware/libhardware/include \
#                     ${ROM_ROOT}/system/core/include \
#         			${ROM_ROOT}/frameworks/native/opengl/include
# LOCAL_LDLIBS += -L$(SYS_DIR) -lc -lcutils -lutils -lui -lbinder -lgui \
# -ljnigraphics -llog -ldl -lstdc++ -lz -landroid \
# -lEGL -lGLESv2 -lGLESv1_CM $(SYS_DIR)/libc.so

# LOCAL_SRC_FILES := hwc.cpp
# include $(BUILD_EXECUTABLE)

# include $(CLEAR_VARS)  
# LOCAL_MODULE := surface_fix

# LOCAL_C_INCLUDES += \
#                     ${ROM_ROOT}/frameworks/native/include \
#                     ${ROM_ROOT}/hardware/libhardware/include \
#                     ${ROM_ROOT}/system/core/include \
#         			${ROM_ROOT}//frameworks/native/opengl/include
# LOCAL_LDLIBS += -L$(SYS_DIR) -lc -lcutils -lutils -lui -lbinder -lgui \
# -ljnigraphics -llog -ldl -lstdc++ -lz  -malign-double -malign-loops -landroid \
# -lEGL -lGLESv2 -lGLESv1_CM $(SYS_DIR)/libc.so

# LOCAL_SRC_FILES := surface_fix.cpp
# include $(BUILD_EXECUTABLE) 

# include $(CLEAR_VARS)  
# LOCAL_MODULE := vt

# LOCAL_CFLAGS := -DGL_GLEXT_PROTOTYPES
# LOCAL_C_INCLUDES += \
#                     ${ROM_ROOT}/frameworks/native/include \
#                     ${ROM_ROOT}/hardware/libhardware/include \
#                     ${ROM_ROOT}/system/core/include \
#                    ${ROM_ROOT}/frameworks/native/opengl/include
# LOCAL_LDLIBS += -L$(SYS_DIR) -lc -lcutils -lutils  -lEGL -lGLESv2  -lui -lbinder -llog -ldl -lstdc++ -lz \
#                     -landroid $(SYS_DIR)/libc.so  -lstlport -lsync
# LOCAL_SRC_FILES := vt.c
# include $(BUILD_EXECUTABLE)  

# include $(CLEAR_VARS)  
# LOCAL_MODULE := copy_texture
# 
# LOCAL_CFLAGS := -DGL_GLEXT_PROTOTYPES
# LOCAL_C_INCLUDES += \
#                     ${ROM_ROOT}/frameworks/native/include \
#                     ${ROM_ROOT}/hardware/libhardware/include \
#                     ${ROM_ROOT}/system/core/include \
#                    ${ROM_ROOT}/frameworks/native/opengl/include
# LOCAL_LDLIBS += -L$(SYS_DIR) -lc -lcutils -lutils  -lEGL -lGLESv2  -lui -lbinder -llog -ldl -lstdc++ -lz \
#                    -malign-double -malign-loops -landroid $(SYS_DIR)/libc.so  -lstlport -lsync
# LOCAL_SRC_FILES := gl2_copyTexImage.cpp
# include $(BUILD_EXECUTABLE)  

# include $(CLEAR_VARS)  
# LOCAL_MODULE := texture_img 
# 
# LOCAL_C_INCLUDES += \
#                     ${ROM_ROOT}/frameworks/native/include \
#                     ${ROM_ROOT}/hardware/libhardware/include \
#                     ${ROM_ROOT}/system/core/include \
#         ${ROM_ROOT}//frameworks/native/opengl/include
# LOCAL_LDLIBS += -L$(SYS_DIR) -lc -lcutils -lutils -lui -lbinder -lgui -ljnigraphics -llog -ldl -lstdc++ -lz \
#                    -malign-double -malign-loops -landroid -lEGL -lGLESv2 -lGLESv1_CM $(SYS_DIR)/libc.so
# LOCAL_SRC_FILES := texture_copyTexImage.cpp
# include $(BUILD_EXECUTABLE)  

# include $(CLEAR_VARS)  
# LOCAL_MODULE := overlay
# 
# LOCAL_C_INCLUDES += \
#                     ${ROM_ROOT}/frameworks/native/include \
#                     ${ROM_ROOT}/hardware/libhardware/include \
#                     ${ROM_ROOT}/system/core/include \
#         ${ROM_ROOT}//frameworks/native/opengl/include
# LOCAL_LDLIBS += -L$(SYS_DIR) -lc -lcutils -lutils -lui -lbinder -lgui -ljnigraphics -llog -ldl -lstdc++ -lz \
#                    -malign-double -malign-loops -landroid -lEGL -lGLESv2 -lGLESv1_CM $(SYS_DIR)/libc.so
# LOCAL_SRC_FILES := overlay.cpp
# include $(BUILD_EXECUTABLE)  

# include $(CLEAR_VARS)  
# LOCAL_MODULE := surface_texture
# 
# LOCAL_C_INCLUDES += \
#                     ${ROM_ROOT}/frameworks/native/include \
#                     ${ROM_ROOT}/hardware/libhardware/include \
#                     ${ROM_ROOT}/system/core/include \
#                    ${ROM_ROOT}/frameworks/native/opengl/include
# LOCAL_LDLIBS += -L$(SYS_DIR) -lc -lcutils -lutils -lui -lbinder  -ljnigraphics -llog -ldl -lstdc++ -lz \
#                    -malign-double -malign-loops -landroid -lEGL -lGLESv2 -lGLESv1_CM $(SYS_DIR)/libc.so \
#                    -lstlport -lsync -lgui
# LOCAL_CPPFLAGS := -DEGL_EGLEXT_PROTOTYPES
# LOCAL_CFLAGS := -DEGL_EGLEXT_PROTOTYPES
# LOCAL_SRC_FILES := surface_texture.cpp
# include $(BUILD_EXECUTABLE)  
